package org.senseframework.support.open.api.exception;


import org.senseframework.support.open.api.service.ApiDefinition;

/**
 * Created by lanjian on 15/6/28.
 */
public class ApiException extends RuntimeException {
    protected Integer code= ApiDefinition.FAIL_CODE;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public ApiException() {
    }

    public ApiException(String message) {
        super(message);
    }


    public ApiException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public ApiException(String message, Integer code, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public ApiException(Throwable cause) {
        super(cause);
    }
}
